/*package com.bigfish.common.utils;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.Random;

import org.apache.commons.dbcp.BasicDataSource;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

public class ExportExce {

	public static void main(String[] args) throws IOException, SQLException {
		//
		BasicDataSource bd = new BasicDataSource();
		bd.setUrl("jdbc:mysql://192.168.0.112:3306/api?characterEncoding=utf-8");
		bd.setUsername("root");
		bd.setPassword("changer123");
		bd.setDriverClassName("com.mysql.jdbc.Driver");
		Connection conn = bd.getConnection();

		PreparedStatement ps = conn.prepareStatement(
				"insert into crm_member (user_id,user_name,phone,age_str,sex,province,city,level,follow_num,buy_num,buy_sum_money,address,symptom,health_history,latest_order_time) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");

		//
		InputStream is = new FileInputStream("C:/Users/DELL/Desktop/memberNum.xlsm");
		XSSFWorkbook wb = new XSSFWorkbook(is);

		for (int sheetIndex = 0; sheetIndex < wb.getNumberOfSheets(); sheetIndex++) {
			XSSFSheet st = wb.getSheetAt(sheetIndex);
			for (int rowIndex = 1; rowIndex <= st.getLastRowNum(); rowIndex++) {
				XSSFRow row = st.getRow(rowIndex);
				// XSSFCell cell = row.getCell(j);
				ps.setString(1, row.getCell(0)==null?"":row.getCell(0).toString());
				ps.setString(2, row.getCell(1)==null?"":row.getCell(1).toString());
				ps.setString(3, row.getCell(2)==null?"":row.getCell(2).getNumericCellValue()+"");
				ps.setString(4, row.getCell(3)==null?"":row.getCell(3).toString());
				ps.setString(5, row.getCell(4)==null?"":row.getCell(4).toString());
				ps.setString(6, row.getCell(5)==null?"":row.getCell(5).toString());
				ps.setString(7, row.getCell(6)==null?"":row.getCell(6).toString());
				ps.setString(8, row.getCell(7)==null?"":row.getCell(7).toString());
				ps.setInt(9, row.getCell(8)==null?0:(int)Double.parseDouble(row.getCell(8).toString()));
				ps.setInt(10, (int)Double.parseDouble(row.getCell(9).toString()));
				ps.setDouble(11, Double.parseDouble(row.getCell(10).toString()));
				ps.setString(12, row.getCell(11)==null?"":row.getCell(11).toString());
				ps.setString(13, row.getCell(12)==null?"":row.getCell(12).toString());
				ps.setString(14, row.getCell(13)==null?"":row.getCell(13).toString());
				ps.setTimestamp(15, new Timestamp(System.currentTimeMillis() - (new Random().nextInt(2000000)+1000000)));
				ps.execute();
			}
		}
		bd.close();
	}
}
*/